<include file="public@header"/>
</head>
<body>
<div class="wrap js-check-wrap">
    <ul class="nav nav-tabs">
        <!-- <li><a href="{:url('AdminCategory/index')}">分类管理</a></li> -->
        <li class="active"><a href="{:url('AdminCategory/add')}">添加模板</a></li>
    </ul>
    <style type="text/css">
        .form-group .mc{width: 20%;display: grid;grid-template-columns: 1fr 8fr 1fr;gap: 2px;align-items: center;text-align: left;}
        .form-group div span{font-size: 16px;}
        .form-group div textarea{height: 500px;}
    </style>
    <div class="row margin-top-20">
        <div class="col-md-12">
            <form class="js-ajax-form margin-top-20 layui-form layui-form-pane" method="post">
                <div class="tab-content">
                    <div class="tab-pane active" id="A">
                        <div class="form-group">
                            <label for="input-name"><span class="form-required">*</span>模板名称</label>
                            <div class="mc">
                                <span class="qz">{$data.theme}_</span>
                                <input type="text" class="form-control" lay-verify="required" id="input-name" name="name">
                                <span class="hz">.html</span>
                            </div>
                            <input type="hidden" value="{$data.theme}" name="theme">
                            <input type="hidden" value="{$data.id|default=''}" name="id">
                        </div>


                        <div class="form-group">
                            <label for="input-description">内容</label>
                            <div>
                                <textarea class="form-control" name="theme_content" id="input-description"></textarea>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="form-group">
                    <button type="button" class="btn btn-primary js-ajax-submit" lay-submit lay-filter="consub">{:lang('ADD')}</button>
                    <a class="btn btn-default" href="{:url('AdminCategory/index')}">{:lang('BACK')}</a>
                </div>
            </form>
        </div>
    </div>
</div>
<script type="text/javascript">
    //根据内容模型赛选模板
    var url = "{:url('AdminCategory/add_theme')}";
    layui.use(['form'], function(){
        LayuiPost(url);
    });
</script>
<script type="text/javascript" src="__STATIC__/js/admin.js"></script>


</body>
</html>